/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"7729FA68-25F0-4A1B-8973-3388012BE00B"}
 */
function imprimir(event) {
	forms.oc_cabecera_imp.controller.loadRecords(oc_cabecera_id)
	forms.oc_cabecera_imp.controller.showPrintPreview()
	/*var $params = {
	pFacturaId: oc_cabecera_id,
	pRazonSocial: uservs_to_uservs.razon_social,
	pDireccion: uservs_to_uservs.calle_nro,
	pCodPostal: uservs_to_uservs.cod_postal,
	pProvincia: uservs_to_uservs.uservs_to_provincias.descripcion,
	pCuit: uservs_to_uservs.cuit,
	pCodBrutos: uservs_to_uservs.cod_ing_brutos,
	pIva: uservs_to_uservs.uservs_to_tipo_iva.tipo_iva_desc
}
globals.metodoJasper('impresion','proveedores/orden_compra.jasper','Orden_compra_n'+nro_oc,'infocom',$params)*/

}

/**
 * @properties={typeid:24,uuid:"13FCDB8F-4CB3-41B1-96F3-2C11C9370D9D"}
 */
function imprimePdf()
{
	forms.oc_cabecera_imp.controller.loadRecords(oc_cabecera_id)
	globals.metodoPdf('oc_cabecera_imp', 'ordenes_compra', false)
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"689E9A97-9E83-4F64-B144-7C551FAB6F58"}
 */
function anular(event) {
	oc_cabecera_to_oc_detalle.deleteAllRecords()
	oc_estado = 2
}

/**
 * Handle record selected.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"15DEDC3B-53DE-43DE-8287-26114555BC6C"}
 */
function onRecordSelection(event) {
	if (oc_estado == 1)
		elements.btn_eliminar.visible = 0
	else
		elements.btn_eliminar.visible = 1
}
